/**********************************************************************************************/
// dgt_AlgConditions.h
//
// Common Lib for Digital Studio
// Block of management of algorithm
// Class, which represent table of conditions of algorithm 
//
// Copyright Diamant Group 2008
/**********************************************************************************************/
#ifndef _dgt_AlgConditions_h_
#define _dgt_AlgConditions_h_

/**********************************************************************************************/
// -------------------------------------------------------------------------------------------//
//                                   Conditions table										  //
// -------------------------------------------------------------------------------------------//
// 1. Plugin (SchemaElement or LogElement), which realize condition			String			  //
// 2. Number of element in plugin library									Int				  //
// 3. Operands of condition													Array of strings  //
/**********************************************************************************************/

#include "dgtKernel.h"
#include "dgt_SmartMacros.h"

SMART_CLASS( dgt_AlgCondition );

WX_DECLARE_OBJARRAY( dgt_AlgCondition_Ptr, dgt_AlgCondArray ); 

/**********************************************************************************************/
/**
* \brief Class, which represent table of conditions of algorithm
*/
class dgt_AlgCondition
{
	public://///////////////////////////////////////////////////////////////////////////////////
		
		/**
		* @brief Ctor as default
		*/
		dgt_AlgCondition( void )	{};

		/**
		* @brief Ctor as default
		* @param inPlugin	Name of plugin library
		* @param inNum		Number of element in library
		* @param inOperands Operands of condition
		*/
		dgt_AlgCondition(	wxString		inPlugin,
							unsigned		inNum,
							wxArrayString	inOperands );

		/**
		* @brief Dtor as default
		*/
		~dgt_AlgCondition( void ) {};

		/**
		* @brief Function for getting name of plugin
		* @return Library name, which realize operation
		*/
		wxString				get_Plugin( void );

		/**
		* @brief Function for getting count of operands in condition
		* @return Count of operands
		*/
		unsigned				get_OpCount( void );

		/**
		* @brief Function for getting array of operands of condition
		* @return Array of operands
		*/
		wxArrayString			get_Operands( void );


		/**
		* @brief Function for getting number of the element in the plugin library
		* @return Number of element
		*/
		unsigned				get_Number( void );

		/**
		* @brief Function for getting operand of condition
		* @param inNum Number of operand
		* @return Operand of condition
		*/
		wxString				get_Operand( unsigned inNum );

		/**
		* @brief Function for setting plugin name 
		* @param inPlugin Plugin library, that realize operation 
		*/
		void					set_Plugin( wxString inPlugin );

		/**
		* @brief Function for setting operands of condition
		* @param inOperands Operands of condition
		*/
		void					set_Operands( wxArrayString inOperands );

		
		/**
		* @brief Function for setting number of the element in the plugin library
		* @param inNumber Number of element
		*/
		void					set_Number( unsigned inNumber );

	public://///////////////////////////////////////////////////////////////////////////////////

	private:////////////////////////////////////////////////////////////////////////////////////

		wxString				m_Plugin;			/*!< Plugin library */

		unsigned				m_Num;				/*!< Number of element in library */
		
		wxArrayString			m_Operands;			/*!< Operands in condition */
};


#endif // _dgt_AlgConditions_h_
